<template>
  <view>
    <view class="cat-article-box" @click="gotoArticle(item.id)">
      <image :src="item.imgs[0] || defaultPic" mode=""></image>
      <view class="cat-article-box-title">
        <text>{{item.title}}</text>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-article",
    data() {
      return {
        defaultPic: '../../static/uni.png'
      };
    },
    props:{
      item:{
        typeof: Object,
        default: {}
      }
    },
    methods:{
      gotoArticle(id){
        console.log(666);
        uni.navigateTo({
          url: '/subpkg/article-detail/article-detail?aid=' + id
        })
      }
    }
  }
</script>

<style lang="scss">

</style>